<ul class="breadcrumb">
  <li><a ui-sref="admin.movies">Movies</a></li>
  <li class="active">{{movie.title}}</li>
</ul>



<div class="spinner big" ng-show="loading">
  <div class="bounce1"></div>
  <div class="bounce2"></div>
  <div class="bounce3"></div>
</div>

<div class="movie-content" ng-show="movie.title"
     ngf-drop ngf-drag-over-class="manageFiles(movie)" ngf-change="upload($files)">

  <div class="row">


    <div class="col-md-8 col-lg-9">

      <div class="row">
        <div class="col-md-11">
          <h1>
            {{movie.title}} &nbsp;
            <a ng-show="movie.hasFiles" class="ion-android-arrow-dropright-circle" ui-sref="player({videoId: movie.id})"></a>
          </h1>
          <span class="label label-danger" ng-click="manageFiles(movie)" ng-show="!movie.hasFiles"><i class="ion-alert-circled"></i> No Video File yet!</span>
          <a ui-sref="admin.reports" class="label label-danger" ng-show="movie.hasFiles && movie.reportCount">
            <i class="ion-alert-circled"></i>
            <span ng-if="movie.reportCount == 1" >1 Report!</span>
            <span ng-if="movie.reportCount > 1" >{{movie.reportCount}} Reports!</span>
          </a>        </div>

        <div class="col-md-1">
          <div class="btn-group pull-right">
            <span uib-dropdown on-toggle="toggled(open)">
              <i class="ion-ios-settings icon-xl" uib-dropdown-toggle></i>
              <ul class="dropdown-menu" uib-dropdown-menu aria-labelledby="simple-dropdown">
                <li><a ng-click="openMovieModal()">Edit info</a></li>
                <li><a ng-click="manageFiles(movie)">Manage Files</a></li>
                <li><a ng-click="deleteMovie(movie)">Delete Movie</a></li>
                <li><a ng-click="addToCurrentNotification()">Add to Email-Notification</a></li>
                <li><a ng-click="highlightOnDashboard()">Highlight on Dashboard</a></li>
              </ul>
            </span>
          </div>
        </div>
      </div>

      <hr/>


      <div class="row">
        <div class="col-sm-2">
          <label>Release Date</label>
          <p class="data-display">{{movie.release_date}}</p>
          <p ng-show="!movie.release_date" class="data-display fade-50">-</p>
        </div>
        <div class="col-sm-2" ng-show="movie.imdb_id">
          <label>IMDB Link</label>
          <p class="data-display"><a target="_blank" href="http://www.imdb.com/title/{{movie.imdb_id}}">{{movie.title}}</a></p>
          <p ng-show="!movie.imdb_id" class="data-display fade-50">-</p>
        </div>
        <div class="col-sm-2" ng-show="movie.vote_average">
          <label>Rating</label>
          <p ng-show="movie.vote_average" class="data-display">{{movie.vote_average}}/10</p>
        </div>
        <div class="col-sm-2" ng-show="movie.vote_count">
          <label>Rating Count</label>
          <p class="data-display">{{movie.vote_count}}</p>
        </div>
      </div>

      <br/>

      <div class="row">
        <div class="col-sm-12">
          <label>Overview</label>
          <p class="data-display">{{movie.overview}}</p>
        </div>

        <div class="col-sm-2" ng-if="movie.trailerKey">
          <label>Trailer</label>
          <iframe width="560" height="315" ng-src="{{'https://www.youtube.com/embed/'+movie.trailerKey+'?rel=0' | trustResourceUrl}}" frameborder="0" allowfullscreen></iframe>
        </div>

        <div class="col-sm-12">
          <label>Genre</label>
          <ul class="genre-list">
            <li class="genre-tag interactive" ng-repeat="genre in movie.genre" ui-sref="dash({genreId: genre.id})">
              {{genre.name}}
            </li>
          </ul>
          <p ng-show="!movie.genre.length" class="data-display fade-50">No genre added yet</p>
        </div>
        <div class="col-sm-12" ng-if="movie.trailer">
          <label>Trailer</label>
          <br>
          <iframe width="560" height="315" ng-src="{{'https://www.youtube.com/embed/'+movie.trailerKey+'?rel=0' | trustResourceUrl}}" frameborder="0" allowfullscreen></iframe>
        </div>
      </div>


      <div class="row" ng-show="!movie.hasFiles">
        <hr/>
        <button class="btn btn-danger btn-block btn-lg" ng-click="manageFiles(movie)">
          <i class="ion-alert-circled"></i> No Video File yet! Drop file or click here to add
        </button>
      </div>

    </div>

    <div class="col-sm-4 col-lg-3" >
      <img ng-if="!movie.poster_path && !movie.poster_image_src" ng-src="{{basePath}}assets/poster-not-found.png"/>
      <img ng-if="movie.poster_path" ng-src="{{movie.poster_path}}"/>
    </div>
  </div>



</div>

<br/>
<hr/>
<div >
  <div class="spinner" ng-show="LoadingSimilar">
    <div class="bounce1"></div>
    <div class="bounce2"></div>
    <div class="bounce3"></div>
  </div>
</div>

<div ng-show="movie.similarMovies">
  <h3>Similar Movies</h3>
  <h5>Suggested by TheMovieDb.org</h5>
  <div class="media-list similar-media">
    <div class="media-list-item" ng-repeat="movie in movie.similarMovies">
      <div class="hover-overlay">
        <div>
          <button class="btn btn-primary btn-sm btn-block" ng-click="addSimilarMovieToStreama(movie, true)">Add and Open</button>
          <button class="btn btn-primary btn-sm btn-block" ng-click="addSimilarMovieToStreama(movie, false)">Add and Continue</button>
          <button class="btn btn-primary btn-sm btn-block" ng-click="showDetails(movie)">Trailer & Details<!-- {{movie.trailerKey}}--></button>

        </div>
      </div>
      <div class="media-item" >
        <img ng-src="{{movie.poster_path}}"/>
      </div>
      <div class="media-meta">Release: {{movie.release_date.substring(0, 4)}} | <i class="ion-ios-star"></i> {{movie.vote_average}}</div>
    </div>
  </div>

</div>
